﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class buyyg : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            
            ReadInfo();
        }
    }
    protected void ReadInfo()//把用户的个人信息读取出来
    {
        string name = "";

        if (Request.QueryString["Oname"] != null)
        {
            name = Request.QueryString["Oname"].ToString().Trim();
        }

        // if (Session["tmpID"] != null)
        // {
        //    id = Session["tmpID"].ToString();
        // }
        txbnameyk.Text = name;

        order tmp = new order();
        tmp.num = name;

        SqlDataReader rd = tmp.Getoneorder(tmp);

        while (rd.Read())
        {
            sexyk.Text = rd["Kpw"].ToString().Trim();
            txtName.Text = rd["Kname"].ToString().Trim();
            txtQq.Text = rd["Kqq"].ToString().Trim();
            txtMail.Text = rd["Kmail"].ToString().Trim();
            txtPhone.Text = rd["Kphone"].ToString().Trim();
            txtAddress.Text = rd["Kaddress"].ToString().Trim();
            txtWork.Text = rd["Kwork"].ToString().Trim();
            txtIdcard.Text = rd["Kidcard"].ToString().Trim();
            string problem = rd["Kproblem"].ToString().Trim();
            if (problem.Length != 0)
            {
                drpProblem.SelectedValue = problem;
            }

            txtAnswer.Text = rd["Kanswer"].ToString().Trim();

        }
        rd.Close();
    }
   
}